﻿<%@ Page Title="Thực phẩm - Quản lý mầm non" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="ThucPhamList.aspx.cs" Inherits="QuanLyDinhDuong_ThucPhamList" %>
<%@ Register Assembly="CollectionPager" Namespace="SiteUtils" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
     <script type="text/javascript">
         function Refresh() {
             $.ajax({
                 type: "POST",
                 url: "ThucPhamList.aspx/Refresh=On",
                 datatype: "json",
                 contentType: "application/json; charset=utf-8",
                 success: function (data) {
                 },
                 error: function (request, status, err) {
                     alert("Cập nhật thất bại");
                     alert(err);
                 }
             });

         }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" Runat="Server">
    <h2>Quản lý thực phẩm</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="toolbarContent" Runat="Server">
    <li><a class="btn-add iframe" data-dimension="800|200" href="ThucPhamDetails.aspx?ac='them'">Thêm</a></li>
    <li><a class="btn-edit iframe" data-dimension="800|200" href="ThucPhamDetails.aspx?ac='sua'">Sửa</a></li>
    <li><a id="delete" class="btn-delete iframe" data-dimension="800|200" href="~/../../Delete.aspx?ac='ThucPham'" >Xóa</a></li>
    <li><a id="Refresh" class="btn-refresh" data-dimension="800|200" href="#" onclick="Refresh()">Nạp dữ liệu</a></li>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentHeader" Runat="Server">
    <table>
        <tr>
            <th class="col50">STT</th>
            <th class="col200">Tên Thực phẩm</th>
            <th>Giá hiện thời</th>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="bottomContent" Runat="Server">
    <asp:Repeater ID="rptA" runat="server">
        <HeaderTemplate>
            <table>
        </HeaderTemplate>
        <ItemTemplate>
            <tr id="<%#Eval("Id")%>">
                 <td class="col50"><%= id++ %></td>
                 <td class="col200"><%#Eval("TenThucPham")%></td>
                 <td><%#Eval("GiaHienThoi")%></td>
            </tr>
        </ItemTemplate>
       <FooterTemplate>
            </table>
       </FooterTemplate>
    </asp:Repeater>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="pageContent" Runat="Server">
    <cc1:CollectionPager ID="Cpage" runat="server"
            BackNextDisplay="HyperLinks" BackNextLinkSeparator="&amp;nbsp;" 
            FirstText="|&lt;" HideOnSinglePage="False" LastText="&gt;|" 
            MaxPages="200" PageNumbersDisplay="Numbers" PageNumbersSeparator="&amp;nbsp;" 
            PagingMode="QueryString" QueryStringKey="Page" 
            ShowFirstLast="True"  ShowLabel="False" ShowPageNumbers="True" BackText="&lt;&lt;" 
            NextText="&gt;&gt;" ResultsLocation="None" ResultsStyle="" 
        LabelStyle="" BackNextButtonStyle="" BackNextLocation="Split" 
        BackNextStyle="display:inline-block;padding:3px 5px;margin:0 2px;float: left;">
    </cc1:CollectionPager>
</asp:Content>

